package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName device
 */
@TableName(value ="device")
@Data
public class Device implements Serializable {
    /**
     * 
     */
    private String temperature;

    /**
     * 
     */
    private String humidity;

    /**
     * 
     */
    private String environment;

    /**
     * 
     */
    private String ph;

    /**
     * 
     */
    private String acceleration;

    /**
     * 
     */
    private String uv;

    /**
     * 
     */
    private String noise;

    /**
     * 
     */
    private Integer cabinid;

    /**
     * 
     */
    private String time;

    /**
     * 
     */
    private String storedEnergy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Device other = (Device) that;
        return (this.getTemperature() == null ? other.getTemperature() == null : this.getTemperature().equals(other.getTemperature()))
            && (this.getHumidity() == null ? other.getHumidity() == null : this.getHumidity().equals(other.getHumidity()))
            && (this.getEnvironment() == null ? other.getEnvironment() == null : this.getEnvironment().equals(other.getEnvironment()))
            && (this.getPh() == null ? other.getPh() == null : this.getPh().equals(other.getPh()))
            && (this.getAcceleration() == null ? other.getAcceleration() == null : this.getAcceleration().equals(other.getAcceleration()))
            && (this.getUv() == null ? other.getUv() == null : this.getUv().equals(other.getUv()))
            && (this.getNoise() == null ? other.getNoise() == null : this.getNoise().equals(other.getNoise()))
            && (this.getCabinid() == null ? other.getCabinid() == null : this.getCabinid().equals(other.getCabinid()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getStoredEnergy() == null ? other.getStoredEnergy() == null : this.getStoredEnergy().equals(other.getStoredEnergy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTemperature() == null) ? 0 : getTemperature().hashCode());
        result = prime * result + ((getHumidity() == null) ? 0 : getHumidity().hashCode());
        result = prime * result + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode());
        result = prime * result + ((getPh() == null) ? 0 : getPh().hashCode());
        result = prime * result + ((getAcceleration() == null) ? 0 : getAcceleration().hashCode());
        result = prime * result + ((getUv() == null) ? 0 : getUv().hashCode());
        result = prime * result + ((getNoise() == null) ? 0 : getNoise().hashCode());
        result = prime * result + ((getCabinid() == null) ? 0 : getCabinid().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getStoredEnergy() == null) ? 0 : getStoredEnergy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", temperature=").append(temperature);
        sb.append(", humidity=").append(humidity);
        sb.append(", environment=").append(environment);
        sb.append(", ph=").append(ph);
        sb.append(", acceleration=").append(acceleration);
        sb.append(", uv=").append(uv);
        sb.append(", noise=").append(noise);
        sb.append(", cabinid=").append(cabinid);
        sb.append(", time=").append(time);
        sb.append(", storedEnergy=").append(storedEnergy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}